/* Categories Panel */
drawCategoryDock({
    mainNav: "#category-nav",
    controlBtn: "#category",
    subNav:"#category-sub-nav",
    config:{
        showBottom:197,
        currentBottom:0
    }
});
$(window).scroll(function(){
    drawCategoryDock({
        mainNav: "#category-nav",
        controlBtn: "#category",
        subNav:"#category-sub-nav",
        config:{
            showBottom:197,
            currentBottom:0
        }
    });
}).resize(function(){
    drawCategoryDock({
        mainNav: "#category-nav",
        controlBtn: "#category",
        subNav:"#category-sub-nav",
        config:{
            showBottom:197,
            currentBottom:0
        }
    });
});
$("#category").controlSubCategoryNav({
    mainNav: "#category-nav",
    subNav:"#category-sub-nav",
    config:{
        showBottom:197,
        currentBottom:0
    }
});

/* Screenshot */
jQuery(document).ready(function() {
    jQuery("#game-screen-shot").jcarousel({
        scroll: 1,
        visible: 2,
        initCallback: slider_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null,
        wrap: 'both',
        auto: 10
    });
});

function slider_initCallback(carousel) {
    /*
        jQuery('.jcarousel-control a').bind('click', function() {
                carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
    return false;
        });*/
    carousel.clip.hover(
        function() {
            sliders[j].stopAuto();
        },
        function() {
            sliders[j].startAuto();
        }
        );
    jQuery('#screen-next').bind('click', function() {
        carousel.next();
        return false;
    });
    jQuery('#screen-back').bind('click', function() {
        carousel.prev();
        return false;
    });
}
        
$("#game-screen-shot").hover(
    function () {
        var height = $("#game-screen-shot-slider").height();
        var width = $("#game-screen-shot-slider").width();
        $("#screen-back").css({
            top: ((height-$("#screen-next").height()) /2)+"px",
            left: "0px"
        });
        $("#screen-next").css({
            top: ((height-$("#screen-back").height()) /2)+"px",
            right: "0px"
        });
        $("#screen-next").fadeIn("slow");
        $("#screen-back").fadeIn("slow");
    },
    function () {
        $("#screen-next").fadeOut("slow");
        $("#screen-back").fadeOut("slow");
    }
    );